<template>
  <div v-if="passage" class="result-section">
    <div class="result-card">
      <h3>识别结果</h3>
      <div class="passage-content">{{ passage }}</div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'RecognitionResult',
  props: {
    passage: {
      type: String,
      default: ''
    }
  }
};
</script>

<style scoped>
.result-section {
  margin-bottom: 30px;
}

.result-card {
  background: white;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(58, 134, 255, 0.1);
}

.result-card h3 {
  margin-top: 0;
  margin-bottom: 15px;
  color: #3a86ff;
  font-size: 1.2rem;
}

.passage-content {
  background-color: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  border-left: 4px solid #3a86ff;
  line-height: 1.6;
  color: #333;
  white-space: pre-wrap;
  word-wrap: break-word;
}
</style>